Integrand size = 22, antiderivative size = 120 \[ \int (f+g x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx=-\frac {b (e f-d g)^2 n x}{3 e^2}-\frac {b (e f-d g) n (f+g x)^2}{6 e g}-\frac {b n (f+g x)^3}{9 g}-\frac {b (e f-d g)^3 n \log (d+e x)}{3 e^3 g}+\frac {(f+g x)^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 g} \]
[Out]
Time = 0.04 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {2442, 45} \[ \int (f+g x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {(f+g x)^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 g}-\frac {b n (e f-d g)^3 \log (d+e x)}{3 e^3 g}-\frac {b n x (e f-d g)^2}{3 e^2}-\frac {b n (f+g x)^2 (e f-d g)}{6 e g}-\frac {b n (f+g x)^3}{9 g} \]
[In]
[Out]
Rule 45
Rule 2442
Rubi steps \begin{align*} \text {integral}& = \frac {(f+g x)^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 g}-\frac {(b e n) \int \frac {(f+g x)^3}{d+e x} \, dx}{3 g} \\ & = \frac {(f+g x)^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 g}-\frac {(b e n) \int \left (\frac {g (e f-d g)^2}{e^3}+\frac {(e f-d g)^3}{e^3 (d+e x)}+\frac {g (e f-d g) (f+g x)}{e^2}+\frac {g (f+g x)^2}{e}\right ) \, dx}{3 g} \\ & = -\frac {b (e f-d g)^2 n x}{3 e^2}-\frac {b (e f-d g) n (f+g x)^2}{6 e g}-\frac {b n (f+g x)^3}{9 g}-\frac {b (e f-d g)^3 n \log (d+e x)}{3 e^3 g}+\frac {(f+g x)^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 g} \\ \end{align*}
Time = 0.10 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.25 \[ \int (f+g x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {6 b d^2 g (-3 e f+d g) n \log (d+e x)+e \left (x \left (6 a e^2 \left (3 f^2+3 f g x+g^2 x^2\right )-b n \left (6 d^2 g^2-3 d e g (6 f+g x)+e^2 \left (18 f^2+9 f g x+2 g^2 x^2\right )\right )\right )+6 b e \left (3 d f^2+e x \left (3 f^2+3 f g x+g^2 x^2\right )\right ) \log \left (c (d+e x)^n\right )\right )}{18 e^3} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(264\) vs. \(2(110)=220\).
Time = 0.85 (sec) , antiderivative size = 265, normalized size of antiderivative = 2.21
method | result | size |
parallelrisch | \(\frac {6 x^{3} \ln \left (c \left (e x +d \right )^{n}\right ) b d \,e^{3} g^{2}-2 x^{3} b d \,e^{3} g^{2} n +6 x^{3} a d \,e^{3} g^{2}+18 x^{2} \ln \left (c \left (e x +d \right )^{n}\right ) b d \,e^{3} f g +3 x^{2} b \,d^{2} e^{2} g^{2} n -9 x^{2} b d \,e^{3} f g n +6 \ln \left (e x +d \right ) b \,d^{4} g^{2} n -18 \ln \left (e x +d \right ) b \,d^{3} e f g n +36 \ln \left (e x +d \right ) b \,d^{2} e^{2} f^{2} n +18 x^{2} a d \,e^{3} f g +18 x \ln \left (c \left (e x +d \right )^{n}\right ) b d \,e^{3} f^{2}-6 x b \,d^{3} e \,g^{2} n +18 x b \,d^{2} e^{2} f g n -18 x b d \,e^{3} f^{2} n +18 x a d \,e^{3} f^{2}-18 \ln \left (c \left (e x +d \right )^{n}\right ) b \,d^{2} e^{2} f^{2}}{18 d \,e^{3}}\) | \(265\) |
risch | \(\frac {a \,g^{2} x^{3}}{3}+a \,f^{2} x -\frac {g^{2} b n \,x^{3}}{9}+g a f \,x^{2}+g \ln \left (c \right ) b f \,x^{2}-\frac {\ln \left (e x +d \right ) b \,f^{3} n}{3 g}-\frac {i g^{2} \pi b \,x^{3} \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}}{6}+\frac {\left (g x +f \right )^{3} b \ln \left (\left (e x +d \right )^{n}\right )}{3 g}+\frac {g^{2} b d n \,x^{2}}{6 e}-\frac {g b f n \,x^{2}}{2}-\frac {g^{2} b \,d^{2} n x}{3 e^{2}}+\frac {g^{2} \ln \left (e x +d \right ) b \,d^{3} n}{3 e^{3}}+\frac {i g^{2} \pi b \,x^{3} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}}{6}+\frac {i g^{2} \pi b \,x^{3} \operatorname {csgn}\left (i \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}}{6}-\frac {i g \pi b f \,x^{2} \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}}{2}-b \,f^{2} n x +\frac {b \,f^{2} n d \ln \left (e x +d \right )}{e}-\frac {i \pi b \,f^{2} x \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}}{2}-\frac {i \pi b \,f^{2} x \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )}{2}-\frac {i g^{2} \pi b \,x^{3} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )}{6}+\frac {i g \pi b f \,x^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}}{2}+\frac {i g \pi b f \,x^{2} \operatorname {csgn}\left (i \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}}{2}+\frac {g^{2} \ln \left (c \right ) b \,x^{3}}{3}+\ln \left (c \right ) b \,f^{2} x +\frac {i \pi b \,f^{2} x \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}}{2}+\frac {i \pi b \,f^{2} x \,\operatorname {csgn}\left (i \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}}{2}+\frac {g b d f n x}{e}-\frac {g \ln \left (e x +d \right ) b \,d^{2} f n}{e^{2}}-\frac {i g \pi b f \,x^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )}{2}\) | \(585\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 221 vs. \(2 (110) = 220\).
Time = 0.29 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.84 \[ \int (f+g x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx=-\frac {2 \, {\left (b e^{3} g^{2} n - 3 \, a e^{3} g^{2}\right )} x^{3} - 3 \, {\left (6 \, a e^{3} f g - {\left (3 \, b e^{3} f g - b d e^{2} g^{2}\right )} n\right )} x^{2} - 6 \, {\left (3 \, a e^{3} f^{2} - {\left (3 \, b e^{3} f^{2} - 3 \, b d e^{2} f g + b d^{2} e g^{2}\right )} n\right )} x - 6 \, {\left (b e^{3} g^{2} n x^{3} + 3 \, b e^{3} f g n x^{2} + 3 \, b e^{3} f^{2} n x + {\left (3 \, b d e^{2} f^{2} - 3 \, b d^{2} e f g + b d^{3} g^{2}\right )} n\right )} \log \left (e x + d\right ) - 6 \, {\left (b e^{3} g^{2} x^{3} + 3 \, b e^{3} f g x^{2} + 3 \, b e^{3} f^{2} x\right )} \log \left (c\right )}{18 \, e^{3}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 252 vs. \(2 (102) = 204\).
Time = 0.66 (sec) , antiderivative size = 252, normalized size of antiderivative = 2.10 \[ \int (f+g x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx=\begin {cases} a f^{2} x + a f g x^{2} + \frac {a g^{2} x^{3}}{3} + \frac {b d^{3} g^{2} \log {\left (c \left (d + e x\right )^{n} \right )}}{3 e^{3}} - \frac {b d^{2} f g \log {\left (c \left (d + e x\right )^{n} \right )}}{e^{2}} - \frac {b d^{2} g^{2} n x}{3 e^{2}} + \frac {b d f^{2} \log {\left (c \left (d + e x\right )^{n} \right )}}{e} + \frac {b d f g n x}{e} + \frac {b d g^{2} n x^{2}}{6 e} - b f^{2} n x + b f^{2} x \log {\left (c \left (d + e x\right )^{n} \right )} - \frac {b f g n x^{2}}{2} + b f g x^{2} \log {\left (c \left (d + e x\right )^{n} \right )} - \frac {b g^{2} n x^{3}}{9} + \frac {b g^{2} x^{3} \log {\left (c \left (d + e x\right )^{n} \right )}}{3} & \text {for}\: e \neq 0 \\\left (a + b \log {\left (c d^{n} \right )}\right ) \left (f^{2} x + f g x^{2} + \frac {g^{2} x^{3}}{3}\right ) & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.21 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.56 \[ \int (f+g x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {1}{3} \, b g^{2} x^{3} \log \left ({\left (e x + d\right )}^{n} c\right ) + \frac {1}{3} \, a g^{2} x^{3} - b e f^{2} n {\left (\frac {x}{e} - \frac {d \log \left (e x + d\right )}{e^{2}}\right )} + \frac {1}{18} \, b e g^{2} n {\left (\frac {6 \, d^{3} \log \left (e x + d\right )}{e^{4}} - \frac {2 \, e^{2} x^{3} - 3 \, d e x^{2} + 6 \, d^{2} x}{e^{3}}\right )} - \frac {1}{2} \, b e f g n {\left (\frac {2 \, d^{2} \log \left (e x + d\right )}{e^{3}} + \frac {e x^{2} - 2 \, d x}{e^{2}}\right )} + b f g x^{2} \log \left ({\left (e x + d\right )}^{n} c\right ) + a f g x^{2} + b f^{2} x \log \left ({\left (e x + d\right )}^{n} c\right ) + a f^{2} x \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 424 vs. \(2 (110) = 220\).
Time = 0.31 (sec) , antiderivative size = 424, normalized size of antiderivative = 3.53 \[ \int (f+g x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {{\left (e x + d\right )} b f^{2} n \log \left (e x + d\right )}{e} + \frac {{\left (e x + d\right )}^{2} b f g n \log \left (e x + d\right )}{e^{2}} - \frac {2 \, {\left (e x + d\right )} b d f g n \log \left (e x + d\right )}{e^{2}} + \frac {{\left (e x + d\right )}^{3} b g^{2} n \log \left (e x + d\right )}{3 \, e^{3}} - \frac {{\left (e x + d\right )}^{2} b d g^{2} n \log \left (e x + d\right )}{e^{3}} + \frac {{\left (e x + d\right )} b d^{2} g^{2} n \log \left (e x + d\right )}{e^{3}} - \frac {{\left (e x + d\right )} b f^{2} n}{e} - \frac {{\left (e x + d\right )}^{2} b f g n}{2 \, e^{2}} + \frac {2 \, {\left (e x + d\right )} b d f g n}{e^{2}} - \frac {{\left (e x + d\right )}^{3} b g^{2} n}{9 \, e^{3}} + \frac {{\left (e x + d\right )}^{2} b d g^{2} n}{2 \, e^{3}} - \frac {{\left (e x + d\right )} b d^{2} g^{2} n}{e^{3}} + \frac {{\left (e x + d\right )} b f^{2} \log \left (c\right )}{e} + \frac {{\left (e x + d\right )}^{2} b f g \log \left (c\right )}{e^{2}} - \frac {2 \, {\left (e x + d\right )} b d f g \log \left (c\right )}{e^{2}} + \frac {{\left (e x + d\right )}^{3} b g^{2} \log \left (c\right )}{3 \, e^{3}} - \frac {{\left (e x + d\right )}^{2} b d g^{2} \log \left (c\right )}{e^{3}} + \frac {{\left (e x + d\right )} b d^{2} g^{2} \log \left (c\right )}{e^{3}} + \frac {{\left (e x + d\right )} a f^{2}}{e} + \frac {{\left (e x + d\right )}^{2} a f g}{e^{2}} - \frac {2 \, {\left (e x + d\right )} a d f g}{e^{2}} + \frac {{\left (e x + d\right )}^{3} a g^{2}}{3 \, e^{3}} - \frac {{\left (e x + d\right )}^{2} a d g^{2}}{e^{3}} + \frac {{\left (e x + d\right )} a d^{2} g^{2}}{e^{3}} \]
[In]
[Out]
Time = 0.84 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.77 \[ \int (f+g x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx=x^2\,\left (\frac {g\,\left (a\,d\,g+2\,a\,e\,f-b\,e\,f\,n\right )}{2\,e}-\frac {d\,g^2\,\left (3\,a-b\,n\right )}{6\,e}\right )+x\,\left (\frac {3\,a\,e\,f^2-3\,b\,e\,f^2\,n+6\,a\,d\,f\,g}{3\,e}-\frac {d\,\left (\frac {g\,\left (a\,d\,g+2\,a\,e\,f-b\,e\,f\,n\right )}{e}-\frac {d\,g^2\,\left (3\,a-b\,n\right )}{3\,e}\right )}{e}\right )+\ln \left (c\,{\left (d+e\,x\right )}^n\right )\,\left (b\,f^2\,x+b\,f\,g\,x^2+\frac {b\,g^2\,x^3}{3}\right )+\frac {g^2\,x^3\,\left (3\,a-b\,n\right )}{9}+\frac {\ln \left (d+e\,x\right )\,\left (b\,n\,d^3\,g^2-3\,b\,n\,d^2\,e\,f\,g+3\,b\,n\,d\,e^2\,f^2\right )}{3\,e^3} \]
[In]
[Out]